home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0799 / 598 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  3.2 KB

  1. Date: Thu, 4 Nov 93 19:16:44 MST
  2. From: shenson@nyx10.cs.du.edu (Stephen Henson)
  3. Message-Id: <9311050216.AA02002@nyx10.cs.du.edu>
  4. X-Disclaimer: Nyx is a public access Unix system run by the University
  5.     of Denver.  The University has neither control over nor
  6.     responsibility for the opinions or correct identity of users.
  7. To: mint@terminator.rs.itd.umich.edu
  8. Subject: Protection woes ...
  9.  
  10. Hi all,
  11.           my head hurts! As some may know, I've being trying to add some
  12. form of protection to Minixfs. This is a way of setting up a partition so
  13. regular TOS will not write to it (e.g. gives an error of some sort). 
  14.           This problem has a long history and has been an unmitigated pain
  15. in the arse since the very first version. The problem is to produce something
  16. which TOS wont write to but not so bad that the hard disk software refuses
  17. access to the partition. I wont bore you with all the details but here's the
  18. latest fun.
  19.           The best method I've used is to make the partition look tiny from
  20. the BPB/TOS point of view and to squeeze the root directory in the free
  21. sector just after the super block. This pseudo root directory is then filled
  22. with volume names. Any attempt by TOS to access this results in an error
  23. because the root directory is full. This method seems to work fine with just
  24. about every piece of hard disk software I've seen/used/been told about.
  25.           The problem with this method though is that if you have a sector
  26. size bigger than 512 bytes the pseudo root directory gets shifted onto vital
  27. data in the filesystem. So for pl7 I tried editing the sector size to 512
  28. bytes and using this same method. AHDI likes this, ICD regards the partition
  29. as invalid (if bigger than about 32Mb) and wont recognise it.
  30.           So I think, keep the sector size the same but shove the pseudo root
  31. directory at the *end* of the disk. This shortens the filesystem by one logical
  32. sector, but never mind. So I twiddle at first with the number of reserved
  33. sectors in sector zero to get it to work. After a while I find ICD likes this
  34. but AHDI doesn't because it seems to want the first data cluster to be on the
  35. disk. No problem, I shorten the filesystem by one more sector. AHDI and ICD
  36. are now both happy. The BPB signals the root directory is in the right place
  37. and alls well.
  38.           So far so good. I fill in the root directory with vol names and to
  39. my surprise they aren't visible to TOS without MiNT/Minixfs. After some head
  40. scratching I find out that TOS itself messes up the root directory calculation
  41. and looks for the root several sectors earlier on!!! So I try a different line,
  42. twiddle with FAT size: same result.
  43.           This isn't fair!!!
  44.           So that's that idea gone away. I've had another idea which should
  45. finally work. Minix has a feature which allows certain blocks to be marked
  46. as bad and ignored by Minix/fsck. So I'll add this feature to Minixfs and
  47. stuff the pseudo root directory in a pile of blocks marked as bad. However
  48. this means I'll have to modify fsck (shouldn't be too hard) and the defragger
  49. (which is a bit trickier) and I'll have to dust off my copy of Minix to see
  50. how bad blocks are handled.
  51.           If anyone has any better ideas, please tell me!
  52. Steve.
  53. __END
  54.  
  55.